
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>3.2 常见错误与常用配置 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    
    <link rel="prev" href="3.1集群节点动态增删.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" >
            
                <span>
            
                    
                    第一章 Hadoop环境搭建
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../chapter1/1.1.html">
            
                <a href="../chapter1/1.1.html">
            
                    
                    1.1 安装JDK
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../chapter1/1.2.html">
            
                <a href="../chapter1/1.2.html">
            
                    
                    1.2 Hadoop伪分布式安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../chapter1/1.3.html">
            
                <a href="../chapter1/1.3.html">
            
                    
                    1.3 完全分布式环境搭建
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    第二章 Hadoop高可用
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../chapter2/HadoopHA原理.html">
            
                <a href="../chapter2/HadoopHA原理.html">
            
                    
                    2.1 HadoopHA原理与机制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../chapter2/HadoopHA搭建规划.html">
            
                <a href="../chapter2/HadoopHA搭建规划.html">
            
                    
                    2.2 HadoopHA搭建规划 
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../chapter2/Zookeeper介绍.html">
            
                <a href="../chapter2/Zookeeper介绍.html">
            
                    
                    2.3 Zookeeper介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../chapter2/Zookeeper搭建.html">
            
                <a href="../chapter2/Zookeeper搭建.html">
            
                    
                    2.4 Zookeeper配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="../chapter2/HadoopHA配置.html">
            
                <a href="../chapter2/HadoopHA配置.html">
            
                    
                    2.5 HadoopHA配置
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    第三章 动态增删节点与常见配置
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="3.1集群节点动态增删.html">
            
                <a href="3.1集群节点动态增删.html">
            
                    
                    3.1 集群节点的动态增删
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.4.2" data-path="3.2常见错误与常用配置.html">
            
                <a href="3.2常见错误与常用配置.html">
            
                    
                    3.2 常见错误与常用配置
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >3.2 常见错误与常用配置</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x5E38;&#x7528;&#x914D;&#x7F6E;&#x9879;">&#x5E38;&#x7528;&#x914D;&#x7F6E;&#x9879;</h1>
<table>
<thead>
<tr>
<th>&#x914D;&#x7F6E;&#x9879;</th>
<th>&#x4F18;&#x5316;&#x539F;&#x7406;</th>
<th>&#x63A8;&#x8350;&#x503C;</th>
</tr>
</thead>
<tbody>
<tr>
<td>dfs.namenode.handler.count</td>
<td>NameNode&#x4E2D;&#x7528;&#x4E8E;&#x5904;&#x7406;RPC&#x8C03;&#x7528;&#x7684;&#x7EBF;&#x7A0B;&#x6570;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;10&#x3002;&#x5BF9;&#x4E8E;&#x8F83;&#x5927;&#x7684;&#x96C6;&#x7FA4;&#x548C;&#x914D;&#x7F6E;&#x8F83;&#x597D;&#x7684;&#x670D;&#x52A1;&#x5668;&#xFF0C;&#x53EF;&#x9002;&#x5F53;&#x589E;&#x52A0;&#x8FD9;&#x4E2A;&#x6570;&#x503C;&#x6765;&#x63D0;&#x5347;NameNode RPC&#x670D;&#x52A1;&#x7684;&#x5E76;&#x53D1;&#x5EA6;&#x3002;</td>
<td>64</td>
</tr>
<tr>
<td>dfs.datanode.handler.count</td>
<td>DataNode&#x4E2D;&#x7528;&#x4E8E;&#x5904;&#x7406;RPC&#x8C03;&#x7528;&#x7684;&#x7EBF;&#x7A0B;&#x6570;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;3&#x3002;&#x53EF;&#x9002;&#x5F53;&#x589E;&#x52A0;&#x8FD9;&#x4E2A;&#x6570;&#x503C;&#x6765;&#x63D0;&#x5347;DataNode RPC&#x670D;&#x52A1;&#x7684;&#x5E76;&#x53D1;&#x5EA6;&#x3002; *&#x7EBF;&#x7A0B;&#x6570;&#x7684;&#x63D0;&#x9AD8;&#x5C06;&#x589E;&#x52A0;DataNode&#x7684;&#x5185;&#x5B58;&#x9700;&#x6C42;&#xFF0C;&#x56E0;&#x6B64;&#xFF0C;&#x4E0D;&#x5B9C;&#x8FC7;&#x5EA6;&#x8C03;&#x6574;&#x8FD9;&#x4E2A;&#x6570;&#x503C;&#x3002;</td>
<td>10</td>
</tr>
<tr>
<td>dfs.replication</td>
<td>&#x6570;&#x636E;&#x5757;&#x7684;&#x5907;&#x4EFD;&#x6570;&#x3002;&#x9ED8;&#x8BA4;&#x503C;&#x4E3A;3&#xFF0C;&#x5BF9;&#x4E8E;&#x4E00;&#x4E9B;&#x70ED;&#x70B9;&#x6570;&#x636E;&#xFF0C;&#x53EF;&#x9002;&#x5F53;&#x589E;&#x52A0;&#x5907;&#x4EFD;&#x6570;&#x3002;</td>
<td>3</td>
</tr>
<tr>
<td>dfs.block.size</td>
<td>HDFS&#x6570;&#x636E;&#x5757;&#x7684;&#x5927;&#x5C0F;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;128M&#x3002;&#x6570;&#x636E;&#x5E93;&#x8BBE;&#x7F6E;&#x592A;&#x5C0F;&#x4F1A;&#x589E;&#x52A0;NameNode&#x7684;&#x538B;&#x529B;&#x3002;&#x6570;&#x636E;&#x5757;&#x8BBE;&#x7F6E;&#x8FC7;&#x5927;&#x4F1A;&#x589E;&#x52A0;&#x5B9A;&#x4F4D;&#x6570;&#x636E;&#x7684;&#x65F6;&#x95F4;&#x3002;</td>
<td>128</td>
</tr>
<tr>
<td>dfs.datanode.data.dir</td>
<td>HDFS&#x6570;&#x636E;&#x5B58;&#x50A8;&#x76EE;&#x5F55;&#x3002;&#x5C06;&#x6570;&#x636E;&#x5B58;&#x50A8;&#x5206;&#x5E03;&#x5728;&#x5404;&#x4E2A;&#x78C1;&#x76D8;&#x4E0A;&#x53EF;&#x5145;&#x5206;&#x5229;&#x7528;&#x8282;&#x70B9;&#x7684;I/O&#x8BFB;&#x5199;&#x6027;&#x80FD;&#x3002;</td>
<td>&#x8BBE;&#x7F6E;&#x591A;&#x4E2A;&#x78C1;&#x76D8;&#x76EE;&#x5F55;</td>
</tr>
<tr>
<td>hadoop.tmp.dir</td>
<td>Hadoop&#x4E34;&#x65F6;&#x76EE;&#x5F55;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;&#x7CFB;&#x7EDF;&#x76EE;&#x5F55;/tmp&#x3002;&#x5728;&#x6BCF;&#x4E2A;&#x78C1;&#x76D8;&#x4E0A;&#x90FD;&#x5EFA;&#x7ACB;&#x4E00;&#x4E2A;&#x4E34;&#x65F6;&#x76EE;&#x5F55;&#xFF0C;&#x53EF;&#x63D0;&#x9AD8;HDFS&#x548C;MapReduce&#x7684;I/O&#x6548;&#x7387;&#x3002;</td>
<td>&#x8BBE;&#x7F6E;&#x591A;&#x4E2A;&#x78C1;&#x76D8;&#x76EE;&#x5F55;</td>
</tr>
<tr>
<td>io.file.buffer.size</td>
<td>HDFS&#x6587;&#x4EF6;&#x7F13;&#x51B2;&#x533A;&#x5927;&#x5C0F;&#xFF0C;&#x9ED8;&#x8BA4;&#x4E3A;4096(&#x5373;4K)&#x3002;</td>
<td>131072(128K)</td>
</tr>
<tr>
<td>fs.trash.interval</td>
<td>HDFS&#x6E05;&#x7406;&#x56DE;&#x6536;&#x7AD9;&#x7684;&#x65F6;&#x95F4;&#x5468;&#x671F;&#xFF0C;&#x5355;&#x4F4D;&#x4E3A;&#x5206;&#x949F;&#x3002;&#x9ED8;&#x8BA4;&#x4E3A;0&#xFF0C;&#x8868;&#x793A;&#x4E0D;&#x4F7F;&#x7528;&#x56DE;&#x6536;&#x7AD9;&#x7279;&#x6027;&#x3002;</td>
<td>&#x4E3A;&#x9632;&#x6B62;&#x91CD;&#x8981;&#x6587;&#x4EF6;&#x8BEF;&#x5220;&#xFF0C;&#x53EF;&#x542F;&#x7528;&#x8BE5;&#x7279;&#x6027;</td>
</tr>
<tr>
<td>dfs.datanode.du.reserved</td>
<td>DataNode&#x4FDD;&#x7559;&#x7A7A;&#x95F4;&#x5927;&#x5C0F;&#xFF0C;&#x5355;&#x4F4D;&#x4E3A;&#x5B57;&#x8282;&#x3002;&#x9ED8;&#x8BA4;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;DataNode&#x4F1A;&#x5360;&#x7528;&#x5168;&#x90E8;&#x53EF;&#x7528;&#x7684;&#x78C1;&#x76D8;&#x7A7A;&#x95F4;&#xFF0C;&#x8BE5;&#x914D;&#x7F6E;&#x9879;&#x53EF;&#x4EE5;&#x4F7F;DataNode&#x4FDD;&#x7559;&#x90E8;&#x5206;&#x78C1;&#x76D8;&#x7A7A;&#x95F4;&#x5DE5;&#x5176;&#x4ED6;&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x4F7F;&#x7528;&#x3002;</td>
<td>&#x89C6;&#x5177;&#x4F53;&#x5E94;&#x7528;&#x800C;&#x5B9A;</td>
</tr>
</tbody>
</table>
<h1 id="&#x89E3;&#x51B3;&#x5E38;&#x89C1;&#x9519;&#x8BEF;">&#x89E3;&#x51B3;&#x5E38;&#x89C1;&#x9519;&#x8BEF;</h1>
<h2 id="&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x4E0E;&#x76EE;&#x5F55;&#x6743;&#x9650;&#x95EE;&#x9898;">&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x4E0E;&#x76EE;&#x5F55;&#x6743;&#x9650;&#x95EE;&#x9898;</h2>
<p>&#x4F7F;&#x7528;&#x666E;&#x901A;&#x7528;&#x6237;&#x914D;&#x7F6E;Hadoop&#x65F6;&#x5E38;&#x89C1;&#x7684;&#x9519;&#x8BEF;&#x662F;&#xFF0C;namenode&#xFF0C;datanode&#x8FDB;&#x7A0B;&#x5F00;&#x542F;&#x5931;&#x8D25;&#xFF0C;&#x6216;&#x8005;&#x5F00;&#x542F;&#x4E86;&#x51E0;&#x79D2;&#x949F;&#x4E4B;&#x540E;&#x8FDB;&#x7A0B;&#x81EA;&#x52A8;&#x5173;&#x95ED;&#x4E86;&#xFF0C;&#x8FD9;&#x5F88;&#x6709;&#x53EF;&#x80FD;&#x662F;&#x6743;&#x9650;&#x95EE;&#x9898;&#xFF1A;</p>
<p>&#x9700;&#x8981;&#x68C0;&#x67E5;&#xFF1A;</p>
<ol>
<li>&#x8BE5;&#x7528;&#x6237;&#x662F;&#x5426;&#x5177;&#x6709;Hadoop&#x76EE;&#x5F55;&#x7684;&#x6743;&#x9650;&#x3002;</li>
<li>&#x8BE5;&#x7528;&#x6237;&#x662F;&#x5426;&#x5177;&#x6709;namenode&#xFF0C;datanode&#x6587;&#x4EF6;&#x5939;&#x7684;&#x6743;&#x9650;&#x3002;</li>
<li>&#x8BE5;&#x7528;&#x6237;&#x662F;&#x5426;&#x5177;&#x5907;&#x514D;&#x5BC6;&#x767B;&#x5F55;&#x672C;&#x673A;&#x7684;&#x6743;&#x9650;&#x3002;</li>
</ol>
<p>&#x4F7F;&#x7528; <code>sudo chown -R &#x7528;&#x6237;&#x540D; &#x8DEF;&#x5F84;</code>  &#x5373;&#x53EF;&#x8BBE;&#x7F6E;&#x8BE5;&#x8DEF;&#x5F84;&#x7684;&#x6743;&#x9650;&#x4E3A;&#x6307;&#x5B9A;&#x7528;&#x6237;</p>
<h2 id="&#x67E5;&#x770B;&#x65E5;&#x5FD7;">&#x67E5;&#x770B;&#x65E5;&#x5FD7;</h2>
<p>&#x5982;&#x679C;&#x8FD8;&#x65E0;&#x6CD5;&#x6210;&#x529F;&#x542F;&#x52A8;&#xFF0C;&#x5219;&#x9700;&#x8981;&#x68C0;&#x67E5;&#x65E5;&#x5FD7;&#x6587;&#x4EF6;&#x67E5;&#x770B;&#x5177;&#x4F53;&#x62A5;&#x9519;&#x4FE1;&#x606F;&#xFF1A;</p>
<p>&#x5207;&#x6362;&#x81F3;<code>hadoop</code>&#x7684;<code>logs</code>&#x76EE;&#x5F55;&#xFF0C;&#x5728;&#x76EE;&#x5F55;&#x4E0B;&#x53EF;&#x4EE5;&#x67E5;&#x770B;&#x5230;&#x8BB8;&#x591A;&#x65E5;&#x5FD7;&#x6587;&#x4EF6;&#x3002;</p>
<p>&#x5982;&#x679C;namenode&#x542F;&#x52A8;&#x5931;&#x8D25;&#xFF0C;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;<code>more</code>&#x547D;&#x4EE4;&#x67E5;&#x770B;<code>hadoop-root-namenode*.log</code>&#x6587;&#x4EF6;&#xFF0C;&#x67E5;&#x770B;&#x62A5;&#x9519;&#x4FE1;&#x606F;&#x3002;</p>
<p>&#x540C;&#x6837;datanode&#x7684;&#x62A5;&#x9519;&#x4E5F;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x7C7B;&#x4F3C;&#x7684;&#x65B9;&#x5F0F;&#x67E5;&#x770B;&#x3002;</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="3.1集群节点动态增删.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page: 3.1 集群节点的动态增删">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"3.2 常见错误与常用配置","level":"1.4.2","depth":2,"previous":{"title":"3.1 集群节点的动态增删","level":"1.4.1","depth":2,"path":"chapter3/3.1集群节点动态增删.md","ref":"chapter3/3.1集群节点动态增删.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"chapter3/3.2常见错误与常用配置.md","mtime":"2019-05-06T16:09:44.731Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-05-06T16:09:52.649Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

